Distance time graph calculations